import React from 'react';
import { render } from 'react-dom';
import { Router, Route } from 'react-router';
import MainView from './MainView.jsx';
import history from '../common/history.es6';

import './style.less';

Object.defineProperty(Object.prototype, 'logx', {
  value: function (name) {
    if (name) {
      console.log(name, this);
    } else {
      console.log(this);
    }
    return this;
  },
  writable: false,
  enumerable: false,
  configurable: false
});

render((
  <Router history={ history }>
    <Route path="/" component={MainView} />
  </Router>
), document.getElementById('root'));
